home *** CD-ROM | disk | FTP | other *** search
/ IRIX Installation Tools & Overlays 2002 November / SGI IRIX Installation Tools & Overlays 2002 November - Disc 4.iso / dist / motif21_dev.idb / usr / Motif-2.1 / include / Xm / TraitP.h.z / TraitP.h
C/C++ Source or Header  |  2002-10-15  |  2KB  |  65 lines

  1. /* $XConsortium: TraitP.h /main/5 1995/07/15 20:56:18 drk $ */
  2. /*
  3.  *  @OSF_COPYRIGHT@
  4.  *  COPYRIGHT NOTICE
  5.  *  Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
  6.  *  ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
  7.  *  the full copyright text.
  8.  */
  9. /*
  10.  * HISTORY
  11.  */
  12.  
  13. #ifndef _XmTraitP_H
  14. #define _XmTraitP_H 1
  15.  
  16. #include <Xm/XmP.h>
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. /* Macros */
  23.  
  24. #define XmeTraitRemove(w, t) XmeTraitSet((XtPointer) w, t, NULL)
  25.  
  26.  
  27. /********    Private Function Declarations    ********/
  28.  
  29. /*
  30.  * XmeTraitGet(object, trait) returns a pointer to the trait_record
  31.  * from looking up the trait on this object.  If the trait
  32.  * is not found then NULL is returned.  This can therefore be used
  33.  * in the following cliche'
  34.  *
  35.  * if (trait_rec = XmeTraitGet(XtClass(w), XmQTactivate)) {
  36.  *   trait_rec -> activate();
  37.  *   trait_rec -> disarm();
  38.  * }
  39.  */
  40.  
  41. extern XtPointer XmeTraitGet(XtPointer, XrmQuark);
  42.  
  43. /* 
  44.  * Boolean XmeTraitSet(object, traitname, traitrecord)
  45.  *
  46.  * Installs the trait on the object.  Boolean will indicate
  47.  * success of the installation.  
  48.  * 
  49.  * Install will use the direct pointer to traitrecord given.  The
  50.  * implementation is therefore not allowed to use automatic
  51.  * storage for traitrecord,  but can use malloc or static initialization
  52.  *
  53.  */
  54.  
  55. extern Boolean XmeTraitSet(XtPointer, XrmQuark, XtPointer);
  56.  
  57. /********    End Private Function Declarations    ********/
  58.  
  59. #ifdef __cplusplus
  60. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  61. #endif
  62.  
  63. #endif /* _XmTraitP_H */
  64.  
  65.